package cn.itsource.org.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

/*
lombok生成getter setter toString是在编译期间
* */
@Data //包含getter setter toString
public class Department extends BaseDomain {
    /*部门编号*/
    private String sn;
    /*部门名称*/
    private String name;
    /*部门所在路径*/
    private String dirPath;
    /*部门状态*/
    private Integer state;
    /*部门经理*/
    private Long manager_id;
    /*上级部门Id*/
    private Long parent_id;
    /*门店id*/
    private Long shop_id;

    /*关联的部门经理*/
    private Employee manager;

    /*上级部门*/
    private Department parent;

    /*用来装子部门*/
    @JsonInclude(JsonInclude.Include.NON_EMPTY)//如果集合为空 就不用转json
    private List<Department> children = new ArrayList<>();


}
